package demo1;

public class Bird extends Animal implements IFlying{
    public Bird(String name) {
        super(name);
    }

    @Override
    public void fly() {
        System.out.println(name +"正在飞！");
    }

    @Override
    public void Eat() {
        System.out.println(name + "正在吃鸟粮！");
    }

    public static void run(IFlying iFlying){
        iFlying.fly();
    }
    public static void main(String[] args) {
        Bird bird = new Bird("小鸟");
        bird.fly();
        bird.Eat();
    }
}